package com.luzhikun.dynameRegist;

import javax.servlet.*;
import java.io.IOException;

/*
 * @Author liu-miss
 * @Description 动态注册额过滤器
 * @Date 23:31 2021/5/6
 **/
public class SomeFilter implements Filter {

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        response.getWriter().println("动态注册Filter成功");
        chain.doFilter(request, response);
    }

    @Override
    public void destroy() {

    }
}
